package com.pactera.jep.service.sys.util;

import org.springframework.stereotype.Component;

@Component
public class UserNameCache {
	//用户名缓存
	private ThreadLocal<String> nameCache = ThreadLocal.withInitial(() -> null);
	//系统号缓存
	private ThreadLocal<String> systemCache = ThreadLocal.withInitial(() -> null);

	public String getName() {
		return nameCache.get();
	}

	public String getSystem() {
		return systemCache.get();
	}

	public void setSystem(String system){
		systemCache.set(system);
	}

	public void setName(String name) {
		nameCache.set(name);
	}
}
